//
//  DataOfArticleCollect.m
//  Gift
//
//  Created by li cheng on 16/09/21
//  Copyright (c) Apon. All rights reserved.
//

#import "DataOfArticleCollect.h"
#import "FavoriteOfDataArticleCollect.h"

@implementation DataOfArticleCollect
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"favorite"]) {
        NSMutableArray<FavoriteOfDataArticleCollect *> *mArrayOfFavoriteOfDataArticleCollect = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            FavoriteOfDataArticleCollect *favoriteOfDataArticleCollect = [FavoriteOfDataArticleCollect modelDic:dic];
            [mArrayOfFavoriteOfDataArticleCollect addObject:favoriteOfDataArticleCollect];
        }
        _favorite = mArrayOfFavoriteOfDataArticleCollect;
    }
}
+ (NSDictionary *)objectClassInArray{
    return @{@"favorite" : [FavoriteOfDataArticleCollect class]};
}

@end
